<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>透明的单例类的编写优化版</title>
</head>
<body>
<script>
    // 变量不能用name
    var name1 = {
        a:function(){
            alert(1)
        },
        b:function () {
            alert(2)
        },
        user:555
    };
    //name.a();
    console.log(name1);
</script>
</body>
</html>